﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UM_SERVER.Command
{
    /// <summary>
    ///     命令行类型基类
    /// </summary>
    public abstract class Command
    {
        /// <summary>
        ///     命令头部
        /// </summary>
        public String[] Header;
        /// <summary>
        ///     命令体
        /// </summary>
        public String[] Body;
        /// <summary>
        ///     命令参数
        /// </summary>
        public String[] Args;
        /// <summary>
        ///     命令输入时间
        /// </summary>
        public DateTime InputTime;
        /// <summary>
        ///     命令所属协议
        /// </summary>
        public CommandProtocol.Protocol Protocol;
        /// <summary>
        ///     命令的类型
        /// </summary>
        public DosCommand.Command command;

        /// <summary>
        ///     得到命令头部
        /// </summary>
        /// <returns>
        ///     返回命令头部
        /// </returns>
        public abstract String[] GetCommandHeader();
        /// <summary>
        ///     得到命令体
        /// </summary>
        /// <returns>
        ///     返回命令体
        /// </returns>
        public abstract String[] GetCommandBody();
        /// <summary>
        ///     得到命令参数
        /// </summary>
        /// <returns>
        ///     返回命令参数
        /// </returns>
        public abstract String[] GetCommandArgs();
        /// <summary>
        ///     得到命令输入时间
        /// </summary>
        /// <returns>
        ///     返回命令输入时间
        /// </returns>
        public abstract DateTime GetCommandInputTime();
        /// <summary>
        ///     得到命令协议
        /// </summary>
        /// <returns>
        ///     返回命令协议
        /// </returns>
        public abstract CommandProtocol.Protocol GetProtocol();
        /// <summary>
        ///     得到命令类型
        /// </summary>
        /// <returns>
        ///     返回命令类型
        /// </returns>
        public abstract DosCommand.Command GetCommand();
    }
}
